package com.server.Example;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * The type Sessions example.
 */
public class SessionsExample {
    /**
     * The Order by clause.
     */
    protected String orderByClause;

    /**
     * The Distinct.
     */
    protected boolean distinct;

    /**
     * The Ored criteria.
     */
    protected List<Criteria> oredCriteria;

    /**
     * Instantiates a new Sessions example.
     */
    public SessionsExample() {
        oredCriteria = new ArrayList<>();
    }

    /**
     * Sets order by clause.
     *
     * @param orderByClause the order by clause
     */
    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    /**
     * Gets order by clause.
     *
     * @return the order by clause
     */
    public String getOrderByClause() {
        return orderByClause;
    }

    /**
     * Sets distinct.
     *
     * @param distinct the distinct
     */
    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    /**
     * Is distinct boolean.
     *
     * @return the boolean
     */
    public boolean isDistinct() {
        return distinct;
    }

    /**
     * Gets ored criteria.
     *
     * @return the ored criteria
     */
    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    /**
     * Or.
     *
     * @param criteria the criteria
     */
    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    /**
     * Or criteria.
     *
     * @return the criteria
     */
    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    /**
     * Create criteria criteria.
     *
     * @return the criteria
     */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    /**
     * Create criteria internal criteria.
     *
     * @return the criteria
     */
    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    /**
     * Clear.
     */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * The type Generated criteria.
     */
    protected abstract static class GeneratedCriteria {
        /**
         * The Criteria.
         */
        protected List<Criterion> criteria;

        /**
         * Instantiates a new Generated criteria.
         */
        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        /**
         * Is valid boolean.
         *
         * @return the boolean
         */
        public boolean isValid() {
            return criteria.size() > 0;
        }

        /**
         * Gets all criteria.
         *
         * @return the all criteria
         */
        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        /**
         * Gets criteria.
         *
         * @return the criteria
         */
        public List<Criterion> getCriteria() {
            return criteria;
        }

        /**
         * Add criterion.
         *
         * @param condition the condition
         */
        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        /**
         * Add criterion.
         *
         * @param condition the condition
         * @param value     the value
         * @param property  the property
         */
        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        /**
         * Add criterion.
         *
         * @param condition the condition
         * @param value1    the value 1
         * @param value2    the value 2
         * @param property  the property
         */
        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        /**
         * And sessions id is null criteria.
         *
         * @return the criteria
         */
        public Criteria andSessionsIdIsNull() {
            addCriterion("Sessions_id is null");
            return (Criteria) this;
        }

        /**
         * And sessions id is not null criteria.
         *
         * @return the criteria
         */
        public Criteria andSessionsIdIsNotNull() {
            addCriterion("Sessions_id is not null");
            return (Criteria) this;
        }

        /**
         * And sessions id equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsIdEqualTo(Integer value) {
            addCriterion("Sessions_id =", value, "sessionsId");
            return (Criteria) this;
        }

        /**
         * And sessions id not equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsIdNotEqualTo(Integer value) {
            addCriterion("Sessions_id <>", value, "sessionsId");
            return (Criteria) this;
        }

        /**
         * And sessions id greater than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsIdGreaterThan(Integer value) {
            addCriterion("Sessions_id >", value, "sessionsId");
            return (Criteria) this;
        }

        /**
         * And sessions id greater than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("Sessions_id >=", value, "sessionsId");
            return (Criteria) this;
        }

        /**
         * And sessions id less than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsIdLessThan(Integer value) {
            addCriterion("Sessions_id <", value, "sessionsId");
            return (Criteria) this;
        }

        /**
         * And sessions id less than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsIdLessThanOrEqualTo(Integer value) {
            addCriterion("Sessions_id <=", value, "sessionsId");
            return (Criteria) this;
        }

        /**
         * And sessions id in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andSessionsIdIn(List<Integer> values) {
            addCriterion("Sessions_id in", values, "sessionsId");
            return (Criteria) this;
        }

        /**
         * And sessions id not in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andSessionsIdNotIn(List<Integer> values) {
            addCriterion("Sessions_id not in", values, "sessionsId");
            return (Criteria) this;
        }

        /**
         * And sessions id between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andSessionsIdBetween(Integer value1, Integer value2) {
            addCriterion("Sessions_id between", value1, value2, "sessionsId");
            return (Criteria) this;
        }

        /**
         * And sessions id not between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andSessionsIdNotBetween(Integer value1, Integer value2) {
            addCriterion("Sessions_id not between", value1, value2, "sessionsId");
            return (Criteria) this;
        }

        /**
         * And sessions movies info is null criteria.
         *
         * @return the criteria
         */
        public Criteria andSessionsMoviesInfoIsNull() {
            addCriterion("Sessions_Movies_info is null");
            return (Criteria) this;
        }

        /**
         * And sessions movies info is not null criteria.
         *
         * @return the criteria
         */
        public Criteria andSessionsMoviesInfoIsNotNull() {
            addCriterion("Sessions_Movies_info is not null");
            return (Criteria) this;
        }

        /**
         * And sessions movies info equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsMoviesInfoEqualTo(Integer value) {
            addCriterion("Sessions_Movies_info =", value, "sessionsMoviesInfo");
            return (Criteria) this;
        }

        /**
         * And sessions movies info not equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsMoviesInfoNotEqualTo(Integer value) {
            addCriterion("Sessions_Movies_info <>", value, "sessionsMoviesInfo");
            return (Criteria) this;
        }

        /**
         * And sessions movies info greater than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsMoviesInfoGreaterThan(Integer value) {
            addCriterion("Sessions_Movies_info >", value, "sessionsMoviesInfo");
            return (Criteria) this;
        }

        /**
         * And sessions movies info greater than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsMoviesInfoGreaterThanOrEqualTo(Integer value) {
            addCriterion("Sessions_Movies_info >=", value, "sessionsMoviesInfo");
            return (Criteria) this;
        }

        /**
         * And sessions movies info less than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsMoviesInfoLessThan(Integer value) {
            addCriterion("Sessions_Movies_info <", value, "sessionsMoviesInfo");
            return (Criteria) this;
        }

        /**
         * And sessions movies info less than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsMoviesInfoLessThanOrEqualTo(Integer value) {
            addCriterion("Sessions_Movies_info <=", value, "sessionsMoviesInfo");
            return (Criteria) this;
        }

        /**
         * And sessions movies info in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andSessionsMoviesInfoIn(List<Integer> values) {
            addCriterion("Sessions_Movies_info in", values, "sessionsMoviesInfo");
            return (Criteria) this;
        }

        /**
         * And sessions movies info not in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andSessionsMoviesInfoNotIn(List<Integer> values) {
            addCriterion("Sessions_Movies_info not in", values, "sessionsMoviesInfo");
            return (Criteria) this;
        }

        /**
         * And sessions movies info between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andSessionsMoviesInfoBetween(Integer value1, Integer value2) {
            addCriterion("Sessions_Movies_info between", value1, value2, "sessionsMoviesInfo");
            return (Criteria) this;
        }

        /**
         * And sessions movies info not between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andSessionsMoviesInfoNotBetween(Integer value1, Integer value2) {
            addCriterion("Sessions_Movies_info not between", value1, value2, "sessionsMoviesInfo");
            return (Criteria) this;
        }

        /**
         * And sessions start time is null criteria.
         *
         * @return the criteria
         */
        public Criteria andSessionsStartTimeIsNull() {
            addCriterion("Sessions_Start_time is null");
            return (Criteria) this;
        }

        /**
         * And sessions start time is not null criteria.
         *
         * @return the criteria
         */
        public Criteria andSessionsStartTimeIsNotNull() {
            addCriterion("Sessions_Start_time is not null");
            return (Criteria) this;
        }

        /**
         * And sessions start time equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsStartTimeEqualTo(Date value) {
            addCriterion("Sessions_Start_time =", value, "sessionsStartTime");
            return (Criteria) this;
        }

        /**
         * And sessions start time not equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsStartTimeNotEqualTo(Date value) {
            addCriterion("Sessions_Start_time <>", value, "sessionsStartTime");
            return (Criteria) this;
        }

        /**
         * And sessions start time greater than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsStartTimeGreaterThan(Date value) {
            addCriterion("Sessions_Start_time >", value, "sessionsStartTime");
            return (Criteria) this;
        }

        /**
         * And sessions start time greater than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsStartTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("Sessions_Start_time >=", value, "sessionsStartTime");
            return (Criteria) this;
        }

        /**
         * And sessions start time less than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsStartTimeLessThan(Date value) {
            addCriterion("Sessions_Start_time <", value, "sessionsStartTime");
            return (Criteria) this;
        }

        /**
         * And sessions start time less than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsStartTimeLessThanOrEqualTo(Date value) {
            addCriterion("Sessions_Start_time <=", value, "sessionsStartTime");
            return (Criteria) this;
        }

        /**
         * And sessions start time in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andSessionsStartTimeIn(List<Date> values) {
            addCriterion("Sessions_Start_time in", values, "sessionsStartTime");
            return (Criteria) this;
        }

        /**
         * And sessions start time not in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andSessionsStartTimeNotIn(List<Date> values) {
            addCriterion("Sessions_Start_time not in", values, "sessionsStartTime");
            return (Criteria) this;
        }

        /**
         * And sessions start time between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andSessionsStartTimeBetween(Date value1, Date value2) {
            addCriterion("Sessions_Start_time between", value1, value2, "sessionsStartTime");
            return (Criteria) this;
        }

        /**
         * And sessions start time not between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andSessionsStartTimeNotBetween(Date value1, Date value2) {
            addCriterion("Sessions_Start_time not between", value1, value2, "sessionsStartTime");
            return (Criteria) this;
        }

        /**
         * And sessions end time is null criteria.
         *
         * @return the criteria
         */
        public Criteria andSessionsEndTimeIsNull() {
            addCriterion("Sessions_End_time is null");
            return (Criteria) this;
        }

        /**
         * And sessions end time is not null criteria.
         *
         * @return the criteria
         */
        public Criteria andSessionsEndTimeIsNotNull() {
            addCriterion("Sessions_End_time is not null");
            return (Criteria) this;
        }

        /**
         * And sessions end time equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsEndTimeEqualTo(Date value) {
            addCriterion("Sessions_End_time =", value, "sessionsEndTime");
            return (Criteria) this;
        }

        /**
         * And sessions end time not equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsEndTimeNotEqualTo(Date value) {
            addCriterion("Sessions_End_time <>", value, "sessionsEndTime");
            return (Criteria) this;
        }

        /**
         * And sessions end time greater than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsEndTimeGreaterThan(Date value) {
            addCriterion("Sessions_End_time >", value, "sessionsEndTime");
            return (Criteria) this;
        }

        /**
         * And sessions end time greater than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsEndTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("Sessions_End_time >=", value, "sessionsEndTime");
            return (Criteria) this;
        }

        /**
         * And sessions end time less than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsEndTimeLessThan(Date value) {
            addCriterion("Sessions_End_time <", value, "sessionsEndTime");
            return (Criteria) this;
        }

        /**
         * And sessions end time less than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsEndTimeLessThanOrEqualTo(Date value) {
            addCriterion("Sessions_End_time <=", value, "sessionsEndTime");
            return (Criteria) this;
        }

        /**
         * And sessions end time in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andSessionsEndTimeIn(List<Date> values) {
            addCriterion("Sessions_End_time in", values, "sessionsEndTime");
            return (Criteria) this;
        }

        /**
         * And sessions end time not in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andSessionsEndTimeNotIn(List<Date> values) {
            addCriterion("Sessions_End_time not in", values, "sessionsEndTime");
            return (Criteria) this;
        }

        /**
         * And sessions end time between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andSessionsEndTimeBetween(Date value1, Date value2) {
            addCriterion("Sessions_End_time between", value1, value2, "sessionsEndTime");
            return (Criteria) this;
        }

        /**
         * And sessions end time not between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andSessionsEndTimeNotBetween(Date value1, Date value2) {
            addCriterion("Sessions_End_time not between", value1, value2, "sessionsEndTime");
            return (Criteria) this;
        }

        /**
         * And sessions create is null criteria.
         *
         * @return the criteria
         */
        public Criteria andSessionsCreateIsNull() {
            addCriterion("Sessions_create is null");
            return (Criteria) this;
        }

        /**
         * And sessions create is not null criteria.
         *
         * @return the criteria
         */
        public Criteria andSessionsCreateIsNotNull() {
            addCriterion("Sessions_create is not null");
            return (Criteria) this;
        }

        /**
         * And sessions create equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsCreateEqualTo(Date value) {
            addCriterion("Sessions_create =", value, "sessionsCreate");
            return (Criteria) this;
        }

        /**
         * And sessions create not equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsCreateNotEqualTo(Date value) {
            addCriterion("Sessions_create <>", value, "sessionsCreate");
            return (Criteria) this;
        }

        /**
         * And sessions create greater than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsCreateGreaterThan(Date value) {
            addCriterion("Sessions_create >", value, "sessionsCreate");
            return (Criteria) this;
        }

        /**
         * And sessions create greater than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsCreateGreaterThanOrEqualTo(Date value) {
            addCriterion("Sessions_create >=", value, "sessionsCreate");
            return (Criteria) this;
        }

        /**
         * And sessions create less than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsCreateLessThan(Date value) {
            addCriterion("Sessions_create <", value, "sessionsCreate");
            return (Criteria) this;
        }

        /**
         * And sessions create less than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andSessionsCreateLessThanOrEqualTo(Date value) {
            addCriterion("Sessions_create <=", value, "sessionsCreate");
            return (Criteria) this;
        }

        /**
         * And sessions create in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andSessionsCreateIn(List<Date> values) {
            addCriterion("Sessions_create in", values, "sessionsCreate");
            return (Criteria) this;
        }

        /**
         * And sessions create not in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andSessionsCreateNotIn(List<Date> values) {
            addCriterion("Sessions_create not in", values, "sessionsCreate");
            return (Criteria) this;
        }

        /**
         * And sessions create between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andSessionsCreateBetween(Date value1, Date value2) {
            addCriterion("Sessions_create between", value1, value2, "sessionsCreate");
            return (Criteria) this;
        }

        /**
         * And sessions create not between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andSessionsCreateNotBetween(Date value1, Date value2) {
            addCriterion("Sessions_create not between", value1, value2, "sessionsCreate");
            return (Criteria) this;
        }
    }

    /**
     * The type Criteria.
     */
    public static class Criteria extends GeneratedCriteria {
        /**
         * Instantiates a new Criteria.
         */
        protected Criteria() {
            super();
        }
    }

    /**
     * The type Criterion.
     */
    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        /**
         * Gets condition.
         *
         * @return the condition
         */
        public String getCondition() {
            return condition;
        }

        /**
         * Gets value.
         *
         * @return the value
         */
        public Object getValue() {
            return value;
        }

        /**
         * Gets second value.
         *
         * @return the second value
         */
        public Object getSecondValue() {
            return secondValue;
        }

        /**
         * Is no value boolean.
         *
         * @return the boolean
         */
        public boolean isNoValue() {
            return noValue;
        }

        /**
         * Is single value boolean.
         *
         * @return the boolean
         */
        public boolean isSingleValue() {
            return singleValue;
        }

        /**
         * Is between value boolean.
         *
         * @return the boolean
         */
        public boolean isBetweenValue() {
            return betweenValue;
        }

        /**
         * Is list value boolean.
         *
         * @return the boolean
         */
        public boolean isListValue() {
            return listValue;
        }

        /**
         * Gets type handler.
         *
         * @return the type handler
         */
        public String getTypeHandler() {
            return typeHandler;
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition the condition
         */
        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition   the condition
         * @param value       the value
         * @param typeHandler the type handler
         */
        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition the condition
         * @param value     the value
         */
        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition   the condition
         * @param value       the value
         * @param secondValue the second value
         * @param typeHandler the type handler
         */
        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition   the condition
         * @param value       the value
         * @param secondValue the second value
         */
        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}